import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int[] arry=new int[]{1,3,2,7,4,5,6};
        int[] ret=num(arry);
        System.out.println(Arrays.toString(ret));

    }
    public static int[] num(int[] arry){
        for(int i=0;i<arry.length;i++){
            for(int j=0;j<arry.length;j++){
                if(j==arry.length-1){
                    break;
                }else{
                    if (arry[j]>arry[j+1]) {
                    int tmp = arry[j + 1];
                    arry[j + 1] = arry[j];
                    arry[j] = tmp;
                }
                }
            }
        }
        return arry;
    }
}
